blob: bb3df5bd00e811e1713703832658d75f9532836a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
package org.yuzu.yuzu_emu.model
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import kotlinx.coroutines.flow.StateFlow
interface GameProperty {
@get:StringRes
val titleId: Int
get() = -1
@get:StringRes
val descriptionId: Int
get() = -1
}
data class SubmenuProperty(
override val titleId: Int,
override val descriptionId: Int,
@DrawableRes val iconId: Int,
val details: (() -> String)? = null,
val detailsFlow: StateFlow<String>? = null,
val action: () -> Unit
) : GameProperty
data class InstallableProperty(
override val titleId: Int,
override val descriptionId: Int,
val install: (() -> Unit)? = null,
val export: (() -> Unit)? = null
) : GameProperty
|